package client_core

import (
	"context"
	"github.com/chicken-team-outside/chicken_transmission/client_core/config"
	"github.com/chicken-team-outside/chicken_transmission/client_core/service"
	"github.com/gin-gonic/gin"
)

func Init(ctx context.Context, databaseFilePath string, engine *gin.Engine) error {
	err := service.Init(databaseFilePath)
	if err != nil {
		return err
	}
	err = config.Init()
	if err != nil {
		return err
	}
	initApi(ctx, engine)
	return nil
}
